# Maintainer: Síle Ekaterin Liszka <sheila@vulpine.house>
pkgname=perl-json
_pkgreal=JSON
pkgver=4.10
pkgrel=1
pkgdesc="Perl module implementing a JSON encoder/decoder"
url="https://metacpan.org/release/JSON"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/I/IS/ISHIGAKI/JSON-$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"

build() {
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
	make
}

check() {
	make test
}

package() {
	make DESTDIR="$pkgdir" install
	find "$pkgdir" -name perllocal.pod -delete
	find "$pkgdir" -name .packlist -delete
}

sha512sums="
2aa0c40fbff23d3df84cfa729d00a32a69e06ea83d082b25b7223f90cb157fa3c2e72342fadcd2ebe09b5848a0e3a7d2caec6d1753e95952a56e3e9367f343e3  JSON-4.10.tar.gz
"
